package ribbon.configuration;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * Created by Administrator on 2016/11/2.
 */
@ComponentScan("ribbon.controller")
@Configuration
public class RibbonConfiguration {
    @Bean(name="LBrestTemplate")
    @LoadBalanced
    RestTemplate restTemplate() {
        RestTemplate t = new RestTemplate();
        return t;
    }
}
